package com.jfreer.blog.dao;

import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.List;

/**
 * User: landy
 * Date: 15/5/4
 * Time: 下午1:57
 */
@Repository
public class TestDao implements ITestDao {
    @Resource
    private JdbcTemplate jdbcTemplate;

    @Override
    public List findList() {
        return jdbcTemplate.queryForList("select * from student");
    }

    @Override
    public Object findFirst() {
        return jdbcTemplate.queryForMap("select * from student limit 0,1");
    }
}
